# Sets the minimum version of CMake required to build your native library.
# This ensures that a certain set of CMake features is available to
# your build.

# 设置构建本机库所需的Cmake的最小版本
cmake_minimum_required(VERSION 3.4.1)

# Specifies a library name, specifies whether the library is STATIC or
# SHARED, and provides relative paths to the source code. You can
# define multiple libraries by adding multiple add_library() commands,
# and CMake builds them for you. When you build your app, Gradle
# automatically packages shared libraries with your APK.

add_library( # Specifies the name of the library.
                native-lib
             # Sets the library as a shared library.
                SHARED
             # Provides a relative path to your source file(s).
        dynamic_register_method.cpp)

find_library(
    # 设置path变量的名称
    log-lib
    # 指定你想要CMake定位的NDK库的名称
    log)

target_link_libraries(
    # 指定目标库
    native-lib
    # 将目标库链接到包含在NDK中的日志库
    )


